package com.example.automatic.abs_video;

import android.accessibilityservice.AccessibilityService;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;

import com.example.automatic.abs_bank.base.BaseAccessibilityService;
import com.example.automatic.utils.LogUtils;

import java.util.List;

/**
 * 火火视频
 */
public class HHAccessibilityService extends BaseAccessibilityService {

    @Override
    protected void onServiceConnected() {
        super.onServiceConnected();
        LogUtils.e("#火火视频-已启动#");

//        getServiceInfo().flags = getServiceInfo().flags | AccessibilityServiceInfo.FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY;

    }

    @Override
    public void onAccessibilityEvent(final AccessibilityEvent event) {



        AccessibilityNodeInfo accessibilityNodeInfo1 = getRootInActiveWindow();
        if (accessibilityNodeInfo1 != null) {
            LogUtils.e(event.getClassName() + "，" + accessibilityNodeInfo1.getClassName() + "，，，，" + event.toString());
        }

        if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
            if (event.getClassName().equals("com.jifen.qu.open.QWebViewActivity")) {

            }
        }
    }

    @Override
    public void onInterrupt() {

    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        LogUtils.e("#火火视频-已关闭#");
    }
}
